home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / bbs / skycop14.zip / ATC.V < prev    next >
Text File  |  1996-04-13  |  2KB  |  63 lines

  1. ! The following is a script which can be used with Virtual BBS version 7.0
  2. ! to call the game, then upon exiting, check for the OUTDOOR file, and if
  3. ! it exists, read it and award the extra time or credits to the player. This
  4. ! is for VBBS, however, the format would be similar for other BBS scripting
  5. ! languages.
  6.  
  7. ACTION "Sky Cop"
  8. $outdoor = "c:\bbs\doors\atc\outdoor.1"
  9.  
  10. ! This reads the extra variable number 7 to see if the game has been played
  11. ! If game already played, it jumps to check the outdoor file
  12. testval $extra7 = 1 played
  13.  
  14. ! This set the extra variable number 7 to 1. Means game has been played.
  15. SETEXTRA 7 1
  16.  
  17. testval $port = 0 local
  18. testval $port = 1 node1
  19. testval $port = 2 node2
  20.  
  21. # local
  22. RETURNSCRIPT atc
  23. door "c:\bbs\doors\atc\atc c:\bbs\temp\n0\door.sys"
  24.  
  25. # node1
  26. RETURNSCRIPT atc
  27. door "c:\bbs\doors\atc\atc c:\bbs\temp\n1\door.sys/5"
  28.  
  29. # node2
  30. RETURNSCRIPT atc
  31. door "c:\bbs\doors\atc\atc c:\bbs\temp\n2\door.sys"
  32.  
  33.  
  34. # played
  35. ! Resets the extra variable 7 to 0, or finished.
  36. SETEXTRA 7 0
  37. checkfile $exist $outdoor
  38. testval $exist <> 0 filethere 
  39. go end
  40.  
  41. # filethere
  42. open $outdoor input
  43. read $who
  44. read $awardtm
  45. read $awardcr
  46. close
  47. $tottime = $awardtm 
  48. $totcred = $awardcr 
  49. ifval $tottime > 0 then
  50.         ADDTIME $tottime
  51. endif
  52. ifval $totcred > 0 then
  53.         ADDCREDITS $totcred
  54. endif
  55. kill $outdoor
  56. # end
  57. exit rdoor
  58.  
  59.  
  60. ! If you write a script to use the outdoor file with your bbs software,
  61. ! please consider uploading it to the FBN BBS so other may be able to
  62. ! use it as a sample.    Thanks
  63.